#define _CRT_SECURE_NO_WARNINGS
#pragma warning(disable:6031)

#include"Slist.h"

void SlistTest1()
{
	SLTNode* plist= NULL;
	SLTPrint(plist);
	SLTPushBack(&plist, 1);
	SLTPushBack(&plist, 2);
	SLTPushBack(&plist, 3);
	SLTPushBack(&plist, 4);
	SLTPrint(plist);

	SLTPushFront(&plist, 4);
	SLTPushFront(&plist, 3);
	SLTPushFront(&plist, 2);
	SLTPushFront(&plist, 1);
	SLTPrint(plist);

	SLTPopBack(&plist);
	SLTPopBack(&plist);
	SLTPopBack(&plist);
	SLTPopBack(&plist);
	SLTPrint(plist);

	SLTPushBack(&plist, 1);
	SLTPushBack(&plist, 2);
	SLTPushBack(&plist, 3);
	SLTPushBack(&plist, 4);
	SLTPrint(plist);

	SLTPopFront(&plist);
	SLTPopFront(&plist);
	SLTPopFront(&plist);
	SLTPopFront(&plist);
	SLTPrint(plist);

	SLTInsert(&plist,SLTFind(plist,1),0);
	SLTPrint(plist);

	SLTInsertAfter(&plist, SLTFind(plist,4 ), 5);
	SLTPrint(plist);

	SLTErase(&plist, SLTFind(plist, 5));
	SLTPrint(plist);

	SLTEraseAfter(SLTFind(plist, 3));
	SLTPrint(plist);


}


int main()
{
	SlistTest1();
	return 0;
}